3.40 \(\int \frac{\csc ^6(e+f x)}{a+b \sec ^2(e+f x)} \, dx\)

Optimal. Leaf size=105 \[ -\frac{a^2 \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{f (a+b)^{7/2}}-\frac{a^2 \cot (e+f x)}{f (a+b)^3}-\frac{\cot ^5(e+f x)}{5 f (a+b)}-\frac{(2 a+b) \cot ^3(e+f x)}{3 f (a+b)^2} \]

[Out]

-((a^2*Sqrt[b]*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/((a + b)^(7/2)*f)) - (a^2*Cot[e + f*x])/((a + b)^3*
f) - ((2*a + b)*Cot[e + f*x]^3)/(3*(a + b)^2*f) - Cot[e + f*x]^5/(5*(a + b)*f)

________________________________________________________________________________________

Rubi [A]  time = 0.139397, antiderivative size = 105, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {4132, 461, 205} \[ -\frac{a^2 \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{f (a+b)^{7/2}}-\frac{a^2 \cot (e+f x)}{f (a+b)^3}-\frac{\cot ^5(e+f x)}{5 f (a+b)}-\frac{(2 a+b) \cot ^3(e+f x)}{3 f (a+b)^2} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^6/(a + b*Sec[e + f*x]^2),x]

[Out]

-((a^2*Sqrt[b]*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/((a + b)^(7/2)*f)) - (a^2*Cot[e + f*x])/((a + b)^3*
f) - ((2*a + b)*Cot[e + f*x]^3)/(3*(a + b)^2*f) - Cot[e + f*x]^5/(5*(a + b)*f)

Rule 4132

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_), x_Symbol] :> With[{ff = Fr
eeFactors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p)/(
1 + ff^2*x^2)^(m/2 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && Integer
Q[n/2]

Rule 461

Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegr
and[((e*x)^m*(a + b*x^n)^p)/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[n
, 0] && IGtQ[p, 0] && (IntegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\csc ^6(e+f x)}{a+b \sec ^2(e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^2}{x^6 \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{(a+b) x^6}+\frac{2 a+b}{(a+b)^2 x^4}+\frac{a^2}{(a+b)^3 x^2}-\frac{a^2 b}{(a+b)^3 \left (a+b+b x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{a^2 \cot (e+f x)}{(a+b)^3 f}-\frac{(2 a+b) \cot ^3(e+f x)}{3 (a+b)^2 f}-\frac{\cot ^5(e+f x)}{5 (a+b) f}-\frac{\left (a^2 b\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{(a+b)^3 f}\\ &=-\frac{a^2 \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{(a+b)^{7/2} f}-\frac{a^2 \cot (e+f x)}{(a+b)^3 f}-\frac{(2 a+b) \cot ^3(e+f x)}{3 (a+b)^2 f}-\frac{\cot ^5(e+f x)}{5 (a+b) f}\\ \end{align*}

Mathematica [C]  time = 1.82896, size = 318, normalized size = 3.03 \[ \frac{\sec ^2(e+f x) (a \cos (2 (e+f x))+a+2 b) \left (\sqrt{a+b} \csc (e) \sqrt{b (\cos (e)-i \sin (e))^4} \csc ^5(e+f x) \left (10 \left (8 a^2+b^2\right ) \sin (f x)-40 a^2 \sin (2 e+3 f x)+8 a^2 \sin (4 e+5 f x)+30 a b \sin (2 e+3 f x)+15 a b \sin (4 e+3 f x)-9 a b \sin (4 e+5 f x)-30 b (3 a+b) \sin (2 e+f x)+10 b^2 \sin (2 e+3 f x)-2 b^2 \sin (4 e+5 f x)\right )+240 a^2 b (\cos (2 e)-i \sin (2 e)) \tan ^{-1}\left (\frac{(\cos (2 e)-i \sin (2 e)) \sec (f x) (a \sin (2 e+f x)-(a+2 b) \sin (f x))}{2 \sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right )\right )}{480 f (a+b)^{7/2} \sqrt{b (\cos (e)-i \sin (e))^4} \left (a+b \sec ^2(e+f x)\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^6/(a + b*Sec[e + f*x]^2),x]

[Out]

((a + 2*b + a*Cos[2*(e + f*x)])*Sec[e + f*x]^2*(240*a^2*b*ArcTan[(Sec[f*x]*(Cos[2*e] - I*Sin[2*e])*(-((a + 2*b
)*Sin[f*x]) + a*Sin[2*e + f*x]))/(2*Sqrt[a + b]*Sqrt[b*(Cos[e] - I*Sin[e])^4])]*(Cos[2*e] - I*Sin[2*e]) + Sqrt
[a + b]*Csc[e]*Csc[e + f*x]^5*Sqrt[b*(Cos[e] - I*Sin[e])^4]*(10*(8*a^2 + b^2)*Sin[f*x] - 30*b*(3*a + b)*Sin[2*
e + f*x] - 40*a^2*Sin[2*e + 3*f*x] + 30*a*b*Sin[2*e + 3*f*x] + 10*b^2*Sin[2*e + 3*f*x] + 15*a*b*Sin[4*e + 3*f*
x] + 8*a^2*Sin[4*e + 5*f*x] - 9*a*b*Sin[4*e + 5*f*x] - 2*b^2*Sin[4*e + 5*f*x])))/(480*(a + b)^(7/2)*f*(a + b*S
ec[e + f*x]^2)*Sqrt[b*(Cos[e] - I*Sin[e])^4])

________________________________________________________________________________________

Maple [A]  time = 0.115, size = 116, normalized size = 1.1 \begin{align*} -{\frac{1}{5\,f \left ( a+b \right ) \left ( \tan \left ( fx+e \right ) \right ) ^{5}}}-{\frac{{a}^{2}}{f \left ( a+b \right ) ^{3}\tan \left ( fx+e \right ) }}-{\frac{b}{3\,f \left ( a+b \right ) ^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}-{\frac{2\,a}{3\,f \left ( a+b \right ) ^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}-{\frac{{a}^{2}b}{f \left ( a+b \right ) ^{3}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^6/(a+b*sec(f*x+e)^2),x)

[Out]

-1/5/f/(a+b)/tan(f*x+e)^5-1/f*a^2/(a+b)^3/tan(f*x+e)-1/3/f/(a+b)^2/tan(f*x+e)^3*b-2/3/f/(a+b)^2/tan(f*x+e)^3*a
-1/f*a^2*b/(a+b)^3/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6/(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.606366, size = 1397, normalized size = 13.3 \begin{align*} \left [-\frac{4 \,{\left (8 \, a^{2} - 9 \, a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{5} - 20 \,{\left (4 \, a^{2} - 3 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (a^{2} \cos \left (f x + e\right )^{4} - 2 \, a^{2} \cos \left (f x + e\right )^{2} + a^{2}\right )} \sqrt{-\frac{b}{a + b}} \log \left (\frac{{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \,{\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \,{\left ({\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} -{\left (a b + b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt{-\frac{b}{a + b}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) \sin \left (f x + e\right ) + 60 \, a^{2} \cos \left (f x + e\right )}{60 \,{\left ({\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f \cos \left (f x + e\right )^{4} - 2 \,{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f \cos \left (f x + e\right )^{2} +{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f\right )} \sin \left (f x + e\right )}, -\frac{2 \,{\left (8 \, a^{2} - 9 \, a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{5} - 10 \,{\left (4 \, a^{2} - 3 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (a^{2} \cos \left (f x + e\right )^{4} - 2 \, a^{2} \cos \left (f x + e\right )^{2} + a^{2}\right )} \sqrt{\frac{b}{a + b}} \arctan \left (\frac{{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt{\frac{b}{a + b}}}{2 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 30 \, a^{2} \cos \left (f x + e\right )}{30 \,{\left ({\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f \cos \left (f x + e\right )^{4} - 2 \,{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f \cos \left (f x + e\right )^{2} +{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f\right )} \sin \left (f x + e\right )}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6/(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

[-1/60*(4*(8*a^2 - 9*a*b - 2*b^2)*cos(f*x + e)^5 - 20*(4*a^2 - 3*a*b - b^2)*cos(f*x + e)^3 - 15*(a^2*cos(f*x +
 e)^4 - 2*a^2*cos(f*x + e)^2 + a^2)*sqrt(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 4*
b^2)*cos(f*x + e)^2 + 4*((a^2 + 3*a*b + 2*b^2)*cos(f*x + e)^3 - (a*b + b^2)*cos(f*x + e))*sqrt(-b/(a + b))*sin
(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2))*sin(f*x + e) + 60*a^2*cos(f*x + e))/(((a^3
 + 3*a^2*b + 3*a*b^2 + b^3)*f*cos(f*x + e)^4 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*f*cos(f*x + e)^2 + (a^3 + 3*a
^2*b + 3*a*b^2 + b^3)*f)*sin(f*x + e)), -1/30*(2*(8*a^2 - 9*a*b - 2*b^2)*cos(f*x + e)^5 - 10*(4*a^2 - 3*a*b -
b^2)*cos(f*x + e)^3 - 15*(a^2*cos(f*x + e)^4 - 2*a^2*cos(f*x + e)^2 + a^2)*sqrt(b/(a + b))*arctan(1/2*((a + 2*
b)*cos(f*x + e)^2 - b)*sqrt(b/(a + b))/(b*cos(f*x + e)*sin(f*x + e)))*sin(f*x + e) + 30*a^2*cos(f*x + e))/(((a
^3 + 3*a^2*b + 3*a*b^2 + b^3)*f*cos(f*x + e)^4 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*f*cos(f*x + e)^2 + (a^3 + 3
*a^2*b + 3*a*b^2 + b^3)*f)*sin(f*x + e))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**6/(a+b*sec(f*x+e)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.32298, size = 243, normalized size = 2.31 \begin{align*} -\frac{\frac{15 \,{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b + b^{2}}}\right )\right )} a^{2} b}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt{a b + b^{2}}} + \frac{15 \, a^{2} \tan \left (f x + e\right )^{4} + 10 \, a^{2} \tan \left (f x + e\right )^{2} + 15 \, a b \tan \left (f x + e\right )^{2} + 5 \, b^{2} \tan \left (f x + e\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )^{5}}}{15 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6/(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

-1/15*(15*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b + b^2)))*a^2*b/((a^3 + 3*a^2*b
 + 3*a*b^2 + b^3)*sqrt(a*b + b^2)) + (15*a^2*tan(f*x + e)^4 + 10*a^2*tan(f*x + e)^2 + 15*a*b*tan(f*x + e)^2 +
5*b^2*tan(f*x + e)^2 + 3*a^2 + 6*a*b + 3*b^2)/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*tan(f*x + e)^5))/f